package Design;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

interface IPromotionStrategy{
    void doPromotion();
}

class CouponStrategy implements IPromotionStrategy{

    public void doPromotion() {
        System.out.println("使用优惠券折扣");
    }
}

class GroupbuyStrategy implements IPromotionStrategy{

    public void doPromotion() {
        System.out.println("返现，直接打款到支付宝账号");
    }
}

class EmptyStrategy implements IPromotionStrategy{

    public void doPromotion() {
        System.out.println("无优惠");
    }
}


class PromotionActivity{
    private IPromotionStrategy strategy;

    public PromotionActivity(IPromotionStrategy strategy) {
        this.strategy = strategy;
    }

    public void execute(){
        strategy.doPromotion();
    }
}

public class client {
    public static void main(String[] args) {
        PromotionActivity activity = new PromotionActivity(new CouponStrategy());
        activity.execute();
    }


}
